import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { LoginComponent } from './components/login.component';
import { LoginRoutingModule } from './login.routing';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { NgZorroAntdModule, NZ_I18N, zh_CN } from 'ng-zorro-antd';

import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
import { LoginService } from './service/login.service';
import { HttpClientModule } from '@angular/common/http';
import { RequestModule } from '../core/request/request.module';
import { environment } from 'src/environments/environment';
registerLocaleData(zh);

@NgModule({
  imports: [
    CommonModule,
    LoginRoutingModule,
    ReactiveFormsModule,
    FormsModule,
    NgZorroAntdModule,
    HttpClientModule,
    RequestModule.forRoot(environment.apiUrl)
  ],
  declarations: [LoginComponent],
  providers: [
    { provide: NZ_I18N, useValue: zh_CN },
    LoginService
  ]
})
export class LoginModule { }
